1. Calculate the trend surface for higher order polynomials. Do higher order polynomials capture large scale trends or are all the trends finer scale? What order polynomial would you choose to detrend your data?
From these plots, I’d choose a 4 degree polynomial - it appears to capture enough fine scale trends.
## $par
## [1] 0.46111 0.38591 0.79994 0.04301
##
## $value
## [1] -17.27
##
## $counts
## function gradient
## 367 NA
##
## $convergence
## [1] 0
##
## $message
## NULL
2. EXTRA CREDIT: There are two other correlation functions built into the spatial package, the Gaussian covariance gaucov and the spherical covariance sphercov. Derive MLE for these two functions via numerical optimization. Turn in an AIC table for the models you fit and identify the best fitting model that you will use for Kriging
3. Explain the figure generated from the previous box of code. What is being plotted (axes, data, model)? How would you interpret this figure? How would you interpret the parameters of the best-fit model? What is the range? Note: you do not need to include the Gaussian and spherical lines if you did not fit them in the previous step.
4. Include your kriged map of mean US ozone for 2008 in your lab report. Where in the country has the highest ozone levels?
Generate a second map of mean US ozone but this time include contours based on the error matrix rather than the prediction matrix. Where are ozone levels most uncertain?
.5 There are a few reasons that one might be skeptical of this initial exploratory map. Name at least two and describe ways the model could be improved (without collecting additional data).
7. Include the time series plot and briefly describe the features of the overall trend in ozone concentrations.
8. Does the detrended data meet the assumptions of second order stationarity? Why or why not?
9. Does the first-difference time series meet the assumptions of second order stationarity? Why or why not?
12. Based on the diagnostics performed, what ARIMA model is likely to perform best? What orders should p, d, and q be? Why? Should you fit the model to xt or rx? 13. Fit the arima model you proposed using the function arima:
arima(xt,c(p,d,q))
Then propose alternative models that are similar to the one you fit (e.g. increase or decrease orders by 1). Based on AIC scores what model provides the best fit? Provide a table of models you tried and their AIC scores.